'''
a = float(input("请输入第一个数："))
b = float(input("请输入第二个数："))
c = input("请选择运算符:+-*/:")

if c == '+':
    n = a+b
    print(n)
elif c == '-':
    n = a-b
    print(n)
elif c == '*':
    n = a*b
    print(n)
elif c=='/':
    if b == 0:
        print("error")
    else:
        n = a/b
        print(n)


a=input("请选择贷款类型(1.商业贷款,2.公积金贷款,3.组合贷款)：")
b=int(input("请输入贷款金额(万)："))
c=int(input("请输入贷款年限（年）："))


if a is '1':
    if(c > 5):
        n = 0.049/12
        month=b*( n*(1+n)**(c*12) / ((1+n)**(c*12)-1) )
        total_pay = month * c * 12
        interest = total_pay - b
        print("每月月供为%.2f万元,支付利息为%.2f万元,还款总额为%.2f万元。"%(month,interest,total_pay))
    else :
        n = 0.0475/12
        month=b*( n*(1+n)**(c*12) / ((1+n)**(c*12)-1) )
        total_pay = month * c * 12
        interest = total_pay - b 
        print("每月月供为%.2f万元,支付利息为%.2f万元,还款总额为%.2f万元。"%(month,interest,total_pay))        

elif a is '2':
    if(c > 5):
        n = 0.0325/12
        month=b*( n*(1+n)**(c*12) / ((1+n)**(c*12)-1) )
        total_pay = month * c * 12
        interest = total_pay - b
        print("每月月供为%.2f万元,支付利息为%.2f万元,还款总额为%.2f万元。"%(month,interest,total_pay))
    else :
        n = 0.0275/12
        month=b*( n*(1+n)**(c*12) / ((1+n)**(c*12)-1) )
        total_pay = month * c * 12
        interest = total_pay - b 
        print("每月月供为%.2f万元,支付利息为%.2f万元,还款总额为%.2f万元。"%(month,interest,total_pay)) 
elif a is '3':
    print("抱歉亲！我们现在还不支持该选项")



import math
a = int(input("请输入一个大于1的正整数："))

def isSu(n):
    if n <= 2:
        return 1
    else:
        b = int(math.sqrt(n))
        for i in range(2, b+1):
            if n % i == 0:
                return 0
        return 1

maxnum = 0
for i in range(0,a+1):
    if isSu(i) == 1:
        maxnum = i
    else :
        continue

print(maxnum)


def fibonacci_recursive(n):  
    if n <= 0:  
        return 0  
    elif n == 1:  
        return 1  
    else:  
        return fibonacci_recursive(n-1) + fibonacci_recursive(n-2)

n = int(input("请输入月数："))
print(fibonacci_recursive(n))



for x in range(1,21):
    for y in range(1, 34):
        z = 100 - x - y
        if(5*x+3*y+z//3==100) and (z%3==0):
            print(f"鸡翁：{x}只, 鸡母：{y}只, 鸡雏：{z}只")

'''



for i in range(1,10001):
    sum = 0
    for j in range(1,i):
        if (i % j == 0):
            sum = sum + j
    if sum == i:
        print(i, end=' ')




